<template>
	<view class="contents" :style="'height:'+screenHeight+'px'">
		<view class="body">
			<view class=" header">
				<view class="imglist">
					<view class="imgleft">
						<u-avatar :src="doctorlist.HeadImg" size='150'></u-avatar>
					</view>
					<view class="imgcount">
						<span class="name">{{doctorlist.DoctorName}}</span>
						<span class="tab">{{doctorlist.Sex}}</span>
						<span class="tab">{{doctorlist.CompanyName}} {{doctorlist.WorkType}}</span>
					</view>
				</view>
				<view class="">
					<u-toast ref="uToast"></u-toast>
				</view>
				<!-- <view class="buttons">
					{{doctorlist.Detail}}
				</view> -->
				<!-- 
				<view class="bottoms">
					<span>{{doctor.number}}次预约 / {{doctor.receive}}次接诊 / {{doctor.doctorage}}年医龄</span>
				</view> -->
			</view>
			<view class="conter">
				<view class="toptext">
					<span class="tiao">|</span>
					<span class="title">擅长领域</span>
				</view>
				<view class="buttontext">
					{{doctorlist.WorkDuty}} 
				</view>
			</view>
			<view class="Scheduling">
				<view style="padding: 3px 10px;">
					<view class="toptext">
						<span class="tiao">|</span>
						<span class="title">详情内容</span>
					</view>
					<view class="span">
						<view class="buttons">
							{{doctorlist.Detail}}
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
			data() {
				return {
					screenHeight: getApp().globalData.screenHeight-44,
					doctorlist:[],
					DoctorId:''
				}
			},
			onLoad:function(doctors){
				this.DoctorId=doctors.DoctorId
				this.getdetil()
				console.log(this.DoctorId)
			},
			computed:{
				
			},
			methods: {
				getdetil(){
					this.$request("Doctor","Detail",
					{DoctorId:this.DoctorId}
					).then(res => {
						console.log("医生详情", res)
						if (res.code == 1) {
							this.doctorlist = res.data
							// this.show=false
						} else {
							// this.show=true
							uni.showToast({
								title: res.msg,
								icon: 'none',
								duration: 2000
							});
						}
					}).catch(err => {
						// this.show=true
						console.log("err", err)
						uni.showToast({
							title: err,
							icon: 'none',
							duration: 1000
						});
					});
				}
			}
		}
</script>

<style>
	@import './doctorlist.css'
</style>